package 软件工程实验三.A1.A11;//Source file: E:\\Projects\\RationRoseProject\\GenerateCode\\Thoroughbred.java


import java.util.Date;

public class Thoroughbred
{
   private Thoroughbred mother;
   private Thoroughbred father;
   private Date birthyear;
   private String name;

   public String getName() {
      return name;
   }

   public void setName(String name) {
      this.name = name;
   }

   public Thoroughbred(Date birthyear, String name) {
      this.birthyear = birthyear;
      this.name = name;
   }

   /**
    * @roseuid 6720C98701D6
    */
   public Thoroughbred()
   {
    
   }

   public void setMother(Thoroughbred mother) {
      this.mother = mother;
   }

   public Date getBirthyear() {
      return birthyear;
   }

   public void setBirthyear(Date birthyear) {
      this.birthyear = birthyear;
   }

   public void setFather(Thoroughbred father) {
      this.father = father;
   }

   /**
    * @return Integer
    * @roseuid 67170F220014
    */
   public Integer getCurrentAge()
   {
    return DateUtils.calculateYearsFromNow(this.birthyear);
   }

   @Override
   public String toString() {
      return "Thoroughbred{" +
              "mother=" + mother +
              ", father=" + father +
              ", birthyear=" + DateUtils.formatDate(birthyear) +
              ", name='" + name + '\'' +
              '}';
   }

   /**
    * @return Thoroughbred
    * @roseuid 67170F2303DD
    */
   public Thoroughbred getFather() 
   {
    return father;
   }
   
   /**
    * @return Thoroughbred
    * @roseuid 67170F25022C
    */
   public Thoroughbred getMother() 
   {
    return mother;
   }
}
